:root {
    --bg-main: #05080d;
    --bg-soft: #0a1018;
    --bg-panel: #0d141e;
    --bg-panel-hover: #111b28;
    --bg-input: #081019;
    --bg-accent-soft: rgba(83, 255, 143, 0.08);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --border-accent: rgba(83, 255, 143, 0.35);

    --text-main: #f4f7fb;
    --text-soft: #aeb9c8;
    --text-muted: #718096;

    --accent: #53ff8f;
    --accent-strong: #26e878;
    --accent-dark: #063f24;

    --danger: #ff6b6b;
    --warning: #ffc857;

    --shadow-panel: 0 24px 60px rgba(0, 0, 0, 0.28);
    --shadow-accent: 0 0 0 1px rgba(83, 255, 143, 0.08),
                     0 0 24px rgba(83, 255, 143, 0.08);

    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 22px;

    --header-height: 74px;
    --content-max-width: 1680px;

    --transition-fast: 160ms ease;
    --transition-normal: 220ms ease;
}

/* ==========================================================================
   RESET
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at top left, rgba(83, 255, 143, 0.05), transparent 30%),
        radial-gradient(circle at top right, rgba(63, 127, 255, 0.05), transparent 28%),
        var(--bg-main);
    color: var(--text-main);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   CABECERA
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: rgba(5, 8, 13, 0.88);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(calc(100% - 40px), var(--content-max-width));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand__logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand__name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 0.94rem;
    font-weight: 700;
    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-panel);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text-main);
}

/* ==========================================================================
   CONTENEDOR GENERAL
   ========================================================================== */

.configurator {
    width: min(calc(100% - 40px), var(--content-max-width));
    margin: 0 auto;
    padding: 42px 0 60px;
}

.configurator-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 30px;
}

.configurator-intro__content {
    max-width: 860px;
}

.section-eyebrow,
.config-panel__eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.configurator-intro__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.configurator-intro__title span {
    color: var(--accent);
}

.configurator-intro__description {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: 1.04rem;
    line-height: 1.7;
}

.catalog-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.catalog-status__indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 14px rgba(255, 200, 87, 0.5);
}

.catalog-status.is-ready .catalog-status__indicator {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(83, 255, 143, 0.55);
}

.catalog-status.is-error .catalog-status__indicator {
    background: var(--danger);
    box-shadow: 0 0 14px rgba(255, 107, 107, 0.5);
}

.global-message {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 200, 87, 0.25);
    border-radius: var(--radius-small);
    background: rgba(255, 200, 87, 0.07);
    color: #ffe5a6;
    font-size: 0.92rem;
}

.global-message.is-error {
    border-color: rgba(255, 107, 107, 0.25);
    background: rgba(255, 107, 107, 0.07);
    color: #ffc1c1;
}

.global-message.is-success {
    border-color: rgba(83, 255, 143, 0.25);
    background: rgba(83, 255, 143, 0.07);
    color: #c4ffd9;
}

/* ==========================================================================
   GRILLA PRINCIPAL
   ========================================================================== */

.configurator-layout {
    display: grid;
    grid-template-columns:
        minmax(280px, 0.86fr)
        minmax(440px, 1.55fr)
        minmax(300px, 0.92fr);
    gap: 18px;
    align-items: stretch;
}

.config-panel {
    min-width: 0;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 28%),
        var(--bg-panel);
    box-shadow: var(--shadow-panel);
}

.config-panel__header {
    flex-shrink: 0;
    min-height: 102px;
    padding: 22px 22px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
}

.config-panel__title {
    margin: 0;
    font-size: 1.24rem;
    line-height: 1.2;
}

.config-panel__subtitle {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 0.87rem;
}

.counter-badge {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    background: var(--bg-accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
}

/* ==========================================================================
   SELECTOR DE PLATAFORMA
   ========================================================================== */

.platform-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.platform-button {
    min-width: 0;
    min-height: 74px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.platform-button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

.platform-button.is-active {
    border-color: var(--border-accent);
    background:
        linear-gradient(
            135deg,
            rgba(83, 255, 143, 0.13),
            rgba(83, 255, 143, 0.03)
        );
    box-shadow: var(--shadow-accent);
}

.platform-button__name {
    color: var(--text-main);
    font-size: 0.91rem;
    font-weight: 800;
}

.platform-button.is-active .platform-button__name {
    color: var(--accent);
}

.platform-button__meta {
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.3;
}

.systems-toolbar-heading {
    margin-top: 18px;
    padding-top: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.systems-toolbar-heading .config-panel__eyebrow {
    margin-bottom: 4px;
}

.systems-toolbar-heading__title {
    margin: 0;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.2;
}

.systems-controls {
    margin-top: 12px;
    transition:
        opacity var(--transition-fast),
        filter var(--transition-fast);
}

.systems-controls.is-disabled {
    opacity: 0.42;
    filter: grayscale(0.25);
    pointer-events: none;
}

.systems-locked-state {
    min-height: 220px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.systems-locked-state__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 13px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-accent);
    border-radius: 50%;
    background: var(--bg-accent-soft);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 900;
}

.systems-locked-state p {
    max-width: 210px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

/* ==========================================================================
   BUSCADORES Y FILTROS
   ========================================================================== */

.config-panel__toolbar {
    flex-shrink: 0;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.search-box {
    position: relative;
    display: block;
}

.search-box__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--text-muted);
    fill: currentColor;
    pointer-events: none;
}

.search-box__input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-main);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.search-box__input::placeholder {
    color: #59677a;
}

.search-box__input:focus {
    border-color: var(--border-accent);
    background: #0a131d;
    box-shadow: 0 0 0 3px rgba(83, 255, 143, 0.07);
}

.search-box__clear {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.search-box__clear:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.filter-button {
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        color var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.filter-button:hover {
    color: var(--text-main);
    border-color: var(--border-strong);
}

.filter-button.is-active {
    color: var(--accent);
    border-color: var(--border-accent);
    background: var(--bg-accent-soft);
}

/* ==========================================================================
   LISTA DE SISTEMAS
   ========================================================================== */

.systems-panel {
    max-height: calc(100vh - var(--header-height) - 96px);
    min-height: 680px;
}

.systems-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.systems-list::-webkit-scrollbar,
.games-list::-webkit-scrollbar,
.summary-list::-webkit-scrollbar {
    width: 8px;
}

.systems-list::-webkit-scrollbar-track,
.games-list::-webkit-scrollbar-track,
.summary-list::-webkit-scrollbar-track {
    background: transparent;
}

.systems-list::-webkit-scrollbar-thumb,
.games-list::-webkit-scrollbar-thumb,
.summary-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.system-item {
    width: 100%;
    min-height: 74px;
    margin: 0 0 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.system-item:last-child {
    margin-bottom: 0;
}

.system-item:hover {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.025);
    transform: translateY(-1px);
}

.system-item.is-active {
    border-color: var(--border-accent);
    background:
        linear-gradient(90deg, rgba(83, 255, 143, 0.10), transparent 80%),
        rgba(255, 255, 255, 0.025);
    box-shadow: var(--shadow-accent);
}

.system-item__image {
    width: 50px;
    height: 50px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #080d14;
}

.system-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.system-item__fallback {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.system-item__content {
    min-width: 0;
}

.system-item__name {
    display: block;
    overflow: hidden;
    color: var(--text-main);
    font-size: 0.94rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-item__meta {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-item__selected-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    background: var(--bg-accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
}

/* ==========================================================================
   COLUMNA CENTRAL
   ========================================================================== */

.content-panel {
    min-height: 680px;
}

.config-panel__body {
    flex: 1;
    min-height: 0;
    position: relative;
}

.content-placeholder {
    min-height: 560px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.content-placeholder__icon {
    width: 86px;
    height: 86px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        radial-gradient(circle, rgba(83, 255, 143, 0.12), transparent 70%),
        rgba(255, 255, 255, 0.025);
    font-size: 2.4rem;
}

.content-placeholder h3 {
    margin: 0;
    font-size: 1.35rem;
}

.content-placeholder p {
    max-width: 440px;
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ==========================================================================
   PACK
   ========================================================================== */

.pack-view {
    padding: 22px;
}

.pack-card {
    min-height: 390px;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background:
        radial-gradient(circle at top left, rgba(83, 255, 143, 0.10), transparent 38%),
        rgba(255, 255, 255, 0.018);
}

.pack-card__image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #080d14;
}

.pack-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}

.pack-card__fallback {
    color: var(--accent);
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.type-label {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 9px;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    background: var(--bg-accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.pack-card__content h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.05;
}

.pack-card__content > p {
    margin: 16px 0 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.pack-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.pack-stat {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.pack-stat dt {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pack-stat dd {
    margin: 0;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 800;
}

/* ==========================================================================
   JUEGOS INDIVIDUALES
   ========================================================================== */

.games-view {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.games-toolbar {
    flex-shrink: 0;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.search-box--games {
    flex: 1;
    min-width: 220px;
}

.games-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.games-list {
    min-height: 0;
    max-height: 500px;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.game-item {
    position: relative;
    min-height: 66px;
    padding: 12px 12px 12px 44px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.game-item:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.03);
}

.game-item:has(.game-item__checkbox:checked) {
    border-color: var(--border-accent);
    background:
        linear-gradient(90deg, rgba(83, 255, 143, 0.08), transparent),
        rgba(255, 255, 255, 0.02);
}

.game-item__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.game-item__checkmark {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #091019;
}

.game-item__checkbox:checked + .game-item__checkmark {
    border-color: var(--accent);
    background: var(--accent);
}

.game-item__checkbox:checked + .game-item__checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #031209;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.game-item__checkbox:focus-visible + .game-item__checkmark {
    outline: 3px solid rgba(83, 255, 143, 0.2);
    outline-offset: 2px;
}

.game-item__content {
    min-width: 0;
}

.game-item__title {
    display: block;
    overflow: hidden;
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-item__meta {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */

.pagination {
    flex-shrink: 0;
    padding: 13px 16px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    border-top: 1px solid var(--border);
}

.pagination__button {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.pagination__button:hover {
    color: var(--text-main);
    border-color: var(--border-strong);
}

.pagination__button.is-active {
    color: #031209;
    border-color: var(--accent);
    background: var(--accent);
}

/* ==========================================================================
   RESUMEN
   ========================================================================== */

.summary-panel {
    max-height: calc(100vh - var(--header-height) - 96px);
    min-height: 680px;
}

.summary-panel__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.summary-empty {
    min-height: 160px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    text-align: center;
}

.summary-empty__icon {
    margin-bottom: 10px;
    font-size: 2rem;
}

.summary-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.summary-list {
    flex: 1;
    min-height: 0;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.summary-group {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
}

.summary-group:last-child {
    margin-bottom: 0;
}

.summary-group__header {
    padding: 11px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.summary-group__title {
    display: block;
    font-size: 0.86rem;
}

.summary-group__header small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.71rem;
}

.summary-group__items {
    margin: 0;
    padding: 7px 10px 9px;
    list-style: none;
}

.summary-game {
    min-height: 30px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.summary-game__name {
    min-width: 0;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-game__remove {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.summary-game__remove:hover {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.08);
}

.icon-button {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.icon-button:hover {
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.3);
    background: rgba(255, 107, 107, 0.07);
}

.summary-totals {
    margin: 16px 0 0;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.summary-total {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.summary-total dt {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.summary-total dd {
    margin: 0;
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 800;
}

.price-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    background:
        radial-gradient(circle at top right, rgba(83, 255, 143, 0.11), transparent 48%),
        var(--bg-accent-soft);
}

.price-card__label {
    display: block;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.price-card__value {
    display: block;
    margin-top: 5px;
    color: var(--accent);
    font-size: 1.75rem;
    line-height: 1.1;
}

.price-card__status {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.summary-actions {
    margin-top: 14px;
    display: grid;
    gap: 9px;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

.primary-button,
.secondary-button {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 11px;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast),
        opacity var(--transition-fast);
}

.primary-button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #031209;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--accent-strong);
}

.secondary-button {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-soft);
}

.secondary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.secondary-button--small {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.72rem;
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   ESTADOS GENERALES
   ========================================================================== */

.loading-state {
    min-height: 130px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    margin: 12px;
    padding: 28px 20px;
    border: 1px dashed var(--border-strong);
    border-radius: 13px;
    text-align: center;
}

.empty-state__icon {
    display: block;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--border);
    background: #04070b;
}

.site-footer__inner {
    width: min(calc(100% - 40px), var(--content-max-width));
    min-height: 110px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.footer-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.footer-brand strong,
.footer-brand small {
    display: block;
}

.footer-brand small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.site-footer__copyright {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.noscript-message {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    padding: 14px 18px;
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 12px;
    background: #2b0e13;
    color: #ffd4d4;
    text-align: center;
    font-weight: 700;
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1250px) {
    .configurator-layout {
        grid-template-columns: minmax(270px, 0.85fr) minmax(430px, 1.4fr);
    }

    .summary-panel {
        grid-column: 1 / -1;
        min-height: auto;
        max-height: none;
    }

    .summary-panel__body {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
        gap: 18px;
    }

    .summary-list,
    .summary-empty {
        grid-row: span 4;
        max-height: 330px;
    }

    .summary-totals,
    .price-card,
    .summary-actions {
        margin-top: 0;
    }
}

@media (max-width: 960px) {
    .site-header__inner {
        width: min(calc(100% - 28px), var(--content-max-width));
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 14px;
        right: 14px;
        padding: 10px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(8, 13, 20, 0.98);
        box-shadow: var(--shadow-panel);
    }

    .site-nav.is-open {
        display: flex;
    }

    .mobile-menu-button {
        display: block;
    }

    .configurator {
        width: min(calc(100% - 28px), var(--content-max-width));
        padding-top: 30px;
    }

    .configurator-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .configurator-layout {
        grid-template-columns: 1fr;
    }

    .systems-panel,
    .summary-panel {
        min-height: auto;
        max-height: none;
    }

    .systems-list {
        max-height: 390px;
    }

    .content-panel {
        min-height: 620px;
    }

    .summary-panel {
        grid-column: auto;
    }

    .summary-panel__body {
        display: flex;
    }

    .summary-list,
    .summary-empty {
        max-height: 320px;
    }

    .pack-card {
        grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.25fr);
    }
}

/* ==========================================================================
   MÓVIL
   ========================================================================== */

@media (max-width: 680px) {
    :root {
        --header-height: 66px;
    }

    body {
        font-size: 15px;
    }

    .site-header__inner,
    .configurator,
    .site-footer__inner {
        width: calc(100% - 20px);
    }

    .brand__logo {
        width: 40px;
        height: 40px;
    }

    .brand__name {
        font-size: 1.1rem;
    }

    .configurator {
        padding-top: 24px;
        padding-bottom: 36px;
    }

    .configurator-intro {
        margin-bottom: 20px;
        gap: 18px;
    }

    .configurator-intro__title {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .configurator-intro__description {
        margin-top: 12px;
        font-size: 0.94rem;
    }

    .catalog-status {
        width: 100%;
        justify-content: center;
    }

    .configurator-layout {
        gap: 12px;
    }

    .config-panel {
        min-height: auto;
        border-radius: 16px;
    }

    .config-panel__header {
        min-height: auto;
        padding: 17px 16px 15px;
    }

    .config-panel__title {
        font-size: 1.08rem;
    }

    .config-panel__subtitle {
        font-size: 0.8rem;
    }

    .config-panel__toolbar {
        padding: 12px;
    }

    .filter-buttons {
        gap: 5px;
    }

    .filter-button {
        min-height: 32px;
        padding: 5px 4px;
        font-size: 0.7rem;
    }

    .systems-list {
        max-height: 360px;
        padding: 8px;
    }

    .system-item {
        min-height: 66px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 8px;
    }

    .system-item__image {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .system-item__name {
        font-size: 0.87rem;
    }

    .content-panel {
        min-height: 540px;
    }

    .content-placeholder {
        min-height: 420px;
        padding: 28px 20px;
    }

    .pack-view {
        padding: 12px;
    }

    .pack-card {
        min-height: auto;
        padding: 18px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pack-card__image {
        max-width: 230px;
        width: 100%;
        margin: 0 auto;
    }

    .pack-card__content {
        text-align: center;
    }

    .pack-card__content h3 {
        font-size: 1.8rem;
    }

    .pack-stats {
        text-align: left;
    }

    .games-toolbar {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .search-box--games {
        min-width: 0;
    }

    .games-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .games-list {
        max-height: 460px;
        padding: 10px;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .summary-panel__body {
        padding: 12px;
    }

    .summary-list,
    .summary-empty {
        max-height: 300px;
    }

    .site-footer__inner {
        padding: 22px 0;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .games-toolbar__actions {
        grid-template-columns: 1fr;
    }

    .pack-stats {
        grid-template-columns: 1fr;
    }

    .filter-button {
        font-size: 0.66rem;
    }

    .site-footer__copyright {
        line-height: 1.5;
    }

	.platform-selector {
		grid-template-columns: 1fr;
	}

	.platform-button {
		min-height: 62px;
	}	
}