/* ── RESET ─────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; overflow-x: hidden; }
body { width: 100%; overflow-x: hidden; }

/* ── HEADER ─────────────────────────────────────────────── */
.header {
    background: #2B2D31;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header--hidden { transform: translateY(-100%); }

.header--scrolled {
    background: rgba(43,45,49,0.96);
    backdrop-filter: blur(10px);
}

.header__container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    height: 48px;
    gap: 0;
}

/* ── LOGO ───────────────────────────────────────────────── */
.header__logo-icon {
    width: 24px; height: 24px;
    background: #5865F2;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.header__logo {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
    color: #F2F3F5;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700; font-size: 14px;
    height: 48px;
    padding-right: 12px;
}

.header__logo svg { width: auto; height: auto; }

.h5 {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700; font-size: 14px;
    color: #F2F3F5;
}

/* ── DESKTOP NAV ─────────────────────────────────────────── */
.header__nav--desktop {
    display: flex; align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.header__nav-item {
    flex-shrink: 0; position: relative;
    height: 48px; display: flex; align-items: center;
    margin-left: 48px;
}

.header__nav-button {
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; height: 48px;
    background: transparent;
    border: none;
    color: #B5BAC1;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400; font-size: 13px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.header__nav-button:hover { color: #F2F3F5; background: #383A40; }
.header__nav-button.active { color: #F2F3F5; background: #383A40; }

.header__nav-icon { width: 24px; height: 24px; stroke: currentColor; }



/* ── CATALOG MEGA MENU ───────────────────────────────────── */
.header__catalog-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 1100px;
    max-height: calc(100vh - 56px);
    background: #2B2D31;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 2px solid #5865F2;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    z-index: 1002;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.header__catalog-menu.active {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}

.header__catalog-menu::before { display: none; }

.header__catalog-menu-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 20px; gap: 0;
}

.header__catalog-column {
    padding: 0 14px;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.header__catalog-column:last-child { border-right: none; }

.header__catalog-category { display: flex; flex-direction: column; gap: 12px; }

.header__catalog-title {
    display: flex; align-items: center; gap: 8px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 600; font-size: 13px;
    color: #F2F3F5;
    text-decoration: none;
    padding: 7px 10px;
    background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.2);
    border-radius: 4px;
    transition: all 0.15s;
}
.header__catalog-title:hover {
    background: rgba(88,101,242,0.2);
    border-color: rgba(88,101,242,0.4);
}
.header__catalog-title svg { color: #5865F2; flex-shrink: 0; width: 16px; height: 16px; }

.header__catalog-sections { display: flex; flex-direction: column; gap: 14px; }
.header__catalog-section { display: flex; flex-direction: column; gap: 4px; }

.header__catalog-section-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700; font-size: 10px;
    color: #5865F2;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 0 8px; margin-bottom: 2px;
}

.header__catalog-link {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400; font-size: 12px;
    color: #B5BAC1;
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 3px;
    display: block;
    transition: all 0.15s;
}
.header__catalog-link:hover { color: #F2F3F5; background: rgba(255,255,255,0.06); }

/* Catalog Banner */
.header__catalog-banner {
    background: rgba(88,101,242,0.08);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 12px 20px;
}
.header__catalog-banner-link {
    display: flex; align-items: center; justify-content: space-between;
    text-decoration: none; color: #F2F3F5;
    transition: color 0.15s;
}
.header__catalog-banner-link:hover { color: #5865F2; }
.header__catalog-banner-link:hover svg { transform: translateX(4px); }
.header__catalog-banner-content { display: flex; align-items: center; gap: 10px; }
.header__catalog-banner-badge {
    background: #5865F2; color: #fff;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700; font-size: 10px;
    padding: 3px 8px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.header__catalog-banner-text {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 500; font-size: 13px; color: #F2F3F5;
}
.header__catalog-banner-link svg {
    color: #5865F2;
    transition: transform 0.15s;
    flex-shrink: 0;
}

/* Mobile close (hidden on desktop) */
.header__catalog-close { display: none; }

/* ── SEARCH ─────────────────────────────────────────────── */
.header__search {
    flex: 1;
    padding: 0 12px;
    position: relative;
}

.header__search-container {
    display: flex; align-items: center;
    background: #1E1F22;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 0 10px; gap: 8px;
    height: 30px;
    transition: border-color 0.15s;
}
.header__search-container:focus-within { border-color: #5865F2; }

.header__search-input {
    flex: 1; border: none; background: transparent;
    color: #F2F3F5;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 13px;
    outline: none;
}
.header__search-input::placeholder { color: #80848E; }

.header__search-button {
    background: none; border: none; cursor: default;
    padding: 0; display: flex; align-items: center; justify-content: center;
    pointer-events: none; color: #80848E;
}
.header__search-button svg { width: 14px; height: 14px; stroke: currentColor; }

/* Search Results */
.header__search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 12px; right: 12px;
    background: #2B2D31;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    padding: 6px 0;
}
.header__search-results.active { display: block; }
.header__search-results-list { list-style: none; }
.header__search-result-item { margin: 0; padding: 0; }

.header__search-result-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    text-decoration: none; color: #F2F3F5;
    transition: background 0.15s;
}
.header__search-result-link:hover { background: rgba(255,255,255,0.06); }

.header__search-result-image {
    width: 48px; height: 48px;
    object-fit: cover; border-radius: 4px; flex-shrink: 0;
}
.header__search-result-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.header__search-result-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 600; font-size: 13px; color: #F2F3F5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header__search-result-genre {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 12px; color: #80848E;
}
.header__search-result-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header__search-result-platforms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.header__search-result-platform-icon { display: flex; align-items: center; color: #80848E; }
.header__search-result-platform-icon svg { width: 40px; height: 18px; fill: currentColor; }
.header__search-result-platform-separator {
    width: 4px; height: 4px;
    background: #80848E; border-radius: 50%; flex-shrink: 0;
}
.header__search-result-price {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 600; font-size: 13px; color: #23A55A;
    margin-left: auto;
}
.header__search-result-item--show-all .header__search-result-link {
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 10px;
}
.header__search-result-show-all {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 12px; color: #5865F2; text-align: center;
}
.header__search-results-loading,
.header__search-results-empty,
.header__search-results-error { padding: 16px; text-align: center; }
.header__search-results-loading p,
.header__search-results-empty p,
.header__search-results-error p {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 13px; color: #80848E; margin: 0;
}
.header__search-results-error p { color: #F23F43; }

/* ── DESKTOP MENU LINKS ──────────────────────────────────── */
.header__menu--desktop {
    display: flex; align-items: center; gap: 0; flex-shrink: 0;
}

.header__menu-link {
    display: flex; align-items: center;
    height: 48px; padding: 0 12px;
    color: #B5BAC1;
    text-decoration: none;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 13px; font-weight: 400;
    /* border-left: 1px solid rgba(255,255,255,0.06); */
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.header__menu-link:hover { color: #F2F3F5; background: #383A40; }
/* Override body-1 typescale */
.header__menu-link.body-1 { font-size: 13px; line-height: 1; }

/* ── DESKTOP CONTROLS ────────────────────────────────────── */
.header__controls--desktop {
    display: flex; align-items: center; gap: 0; flex-shrink: 0;
}

.header__language {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    height: 48px; padding: 0 10px;
    cursor: pointer;
    user-select: none;
}
.header__language-current {
    display: flex; align-items: center; gap: 6px;
    color: #B5BAC1;
    font-size: 12px; font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.header__language-current:hover {
    background: rgba(255,255,255,0.06);
}
.header__language-current svg {
    width: 20px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.header__language-code {
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
}
.header__language-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #1E2025;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    min-width: 90px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 1000;
}
.header__language-dropdown--open {
    display: block;
}
.header__language-option {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none; border: none;
    color: #B5BAC1; font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.header__language-option svg {
    width: 20px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.header__language-option:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.header__language-option--active {
    color: #fff;
    background: rgba(255,255,255,0.04);
}
.header__language-flag {
    width: 20px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    object-fit: cover;
}

/* Mobile language switcher */
.header__mobile-language {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0;
}
.header__mobile-lang-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #B5BAC1; font-size: 13px; font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.header__mobile-lang-btn svg {
    width: 20px; height: 14px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.header__mobile-lang-btn:hover,
.header__mobile-lang-btn--active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}

/* ── MOBILE CONTROLS ─────────────────────────────────────── */
.header__controls--mobile {
    display: none; align-items: center; gap: 0;
    margin-left: auto;
}

.header__menu-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 44px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    color: #B5BAC1;
    transition: color 0.15s, background 0.15s;
}
.header__menu-button:hover { color: #F2F3F5; background: #383A40; }
.header__menu-icon { width: 18px; height: 18px; stroke: currentColor; }

/* ── MOBILE MENU OVERLAY ─────────────────────────────────── */
.header__mobile-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none; opacity: 0;
    transition: opacity 0.25s ease;
}
.header__mobile-menu.active { display: block; opacity: 1; }

.header__mobile-menu-content {
    position: fixed;
    top: 0; right: 0;
    width: 320px; max-width: 85vw;
    height: 100vh;
    background: #2B2D31;
    border-left: 1px solid rgba(255,255,255,0.06);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.header__mobile-menu.active .header__mobile-menu-content { transform: translateX(0); }

.header__mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.header__mobile-menu-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 600; font-size: 14px; color: #F2F3F5;
}
.header__mobile-menu-close {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border: none; border-radius: 4px;
    color: #B5BAC1; cursor: pointer;
    transition: all 0.15s;
}
.header__mobile-menu-close:hover { background: rgba(255,255,255,0.12); color: #F2F3F5; }
.header__mobile-menu-close svg { width: 16px; height: 16px; }

.header__mobile-menu-body {
    flex: 1; overflow-y: auto;
    padding: 14px 16px;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Search */
.header__mobile-search { margin-bottom: 14px; }
.header__mobile-search .header__search-container {
    background: #1E1F22;
    border: 1px solid rgba(255,255,255,0.06);
    height: 34px; border-radius: 4px; padding: 0 10px;
}
.header__mobile-search .header__search-input { color: #F2F3F5; font-size: 13px; }
.header__mobile-search .header__search-input::placeholder { color: #80848E; }
.header__mobile-search .header__search-button { color: #80848E; pointer-events: none; }

/* Mobile Nav */
.header__mobile-nav { display: flex; flex-direction: column; gap: 2px; }
.header__mobile-nav-link {
    display: flex; align-items: center; gap: 10px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 13px; font-weight: 500;
    color: #B5BAC1; text-decoration: none;
    padding: 9px 10px; border-radius: 4px;
    transition: all 0.15s;
}
.header__mobile-nav-link:hover { background: rgba(255,255,255,0.06); color: #F2F3F5; }
.header__mobile-nav-link svg { color: #5865F2; flex-shrink: 0; }

.header__mobile-nav-button {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.2);
    border-radius: 4px;
    color: #F2F3F5;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 500; font-size: 13px;
    cursor: pointer; width: 100%; margin-top: 4px;
    transition: all 0.15s;
}
.header__mobile-nav-button:hover { background: rgba(88,101,242,0.2); border-color: rgba(88,101,242,0.4); }
.header__mobile-nav-button svg:first-child { color: #5865F2; flex-shrink: 0; }
.header__mobile-nav-arrow { margin-left: auto; color: #80848E; transition: transform 0.15s; }
.header__mobile-nav-button:hover .header__mobile-nav-arrow { transform: translateX(4px); color: #5865F2; }

/* Mobile Menu Footer */
.header__mobile-menu-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.header__mobile-language {
    display: flex; align-items: center; gap: 8px;
    color: #B5BAC1;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 13px;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Mobile Categories */
.header__mobile-categories { display: flex; flex-direction: column; gap: 18px; }
.header__mobile-category { display: flex; flex-direction: column; gap: 10px; }
.header__mobile-category-title {
    display: flex; align-items: center; gap: 8px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 600; font-size: 13px; color: #F2F3F5;
    text-decoration: none;
    padding: 8px 10px;
    background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.2);
    border-radius: 4px;
    transition: all 0.15s;
}
.header__mobile-category-title:hover { background: rgba(88,101,242,0.2); border-color: rgba(88,101,242,0.4); }
.header__mobile-category-title svg { color: #5865F2; flex-shrink: 0; width: 16px; height: 16px; }

.header__mobile-sections { display: flex; flex-direction: column; gap: 10px; padding-left: 10px; }
.header__mobile-section { display: flex; flex-direction: column; gap: 3px; }
.header__mobile-section-title {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700; font-size: 10px; color: #5865F2;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 0 6px; margin-bottom: 2px;
}
.header__mobile-link {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 12px;
    color: #B5BAC1; text-decoration: none;
    padding: 5px 6px; border-radius: 3px;
    transition: all 0.15s;
}
.header__mobile-link:hover { color: #F2F3F5; background: rgba(255,255,255,0.06); }

/* Mobile Banner */
.header__mobile-banner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.2);
    border-radius: 4px;
    padding: 10px 12px;
    text-decoration: none; color: #F2F3F5;
    margin-bottom: 12px;
    transition: all 0.15s;
}
.header__mobile-banner:hover { background: rgba(88,101,242,0.2); border-color: rgba(88,101,242,0.4); }
.header__mobile-banner:hover svg { transform: translateX(4px); }
.header__mobile-banner-content { display: flex; flex-direction: column; gap: 4px; }
.header__mobile-banner-badge {
    background: #5865F2; color: #fff;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; font-size: 10px;
    padding: 2px 7px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.06em;
    width: fit-content;
}
.header__mobile-banner-text {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 12px; font-weight: 500; color: #B5BAC1;
}
.header__mobile-banner svg { color: #5865F2; transition: transform 0.15s; flex-shrink: 0; }


/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (min-width: 1920px) {
    .header__catalog-menu { width: 1200px; }
}

@media (min-width: 1512px) and (max-width: 1919px) {
    .header__catalog-menu { width: 1100px; }
}

@media (min-width: 1301px) and (max-width: 1511px) {
    .header__catalog-menu { width: 900px; }
}

@media (max-width: 1300px) {
    .header__nav-text { display: none; }
    .header__catalog-menu {
        width: 700px;
        max-width: calc(100vw - 24px);
    }
    .header__catalog-menu-inner { grid-template-columns: repeat(3, 1fr); gap: 14px 0; }
    .header__catalog-column:nth-child(3) { border-right: none; }
    .header__catalog-column:nth-child(1),
    .header__catalog-column:nth-child(2),
    .header__catalog-column:nth-child(3) {
        border-bottom: 1px solid rgba(255,255,255,0.06);
        padding-bottom: 14px;
    }
    .header__catalog-column:nth-child(4),
    .header__catalog-column:nth-child(5) { padding-top: 14px; }
}

/* ≤ 1024px — switch to mobile layout */
@media (max-width: 1024px) {
    .header__nav--desktop { display: none; }
    .header__menu--desktop { display: none; }
    .header__controls--desktop { display: none; }
    .header__controls--mobile { display: flex; }
}


@media (max-width: 480px) {
    .header__logo span.h5 { display: none; }
}
