/* catalog.php */
/* Поиск по каталогу — та же геометрия, что у поиска на главной (.cg-hsearch),
   но без backdrop-filter: он дорог для GPU, а тут под ним и так тёмный фон. */
.cg-csearch { width: 100%; max-width: 520px; margin: -8px auto 28px; }
.cg-csearch__box {
    display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px;
    background: rgba(10,12,20,.72); border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
    color: rgba(241,245,249,.4); transition: border-color .2s, box-shadow .2s;
}
.cg-csearch__box:focus-within { border-color: rgba(139,92,246,.55); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.cg-csearch__box svg { color: #a78bfa; flex-shrink: 0; }
.cg-csearch__box input {
    flex: 1; min-width: 0; height: 100%; background: none; border: none; outline: none;
    color: #f1f5f9; font-size: .95rem; font-family: inherit; caret-color: #a78bfa;
}
.cg-csearch__box input::placeholder { color: rgba(241,245,249,.38); }
.cg-csearch__box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cg-csearch__kbd { flex-shrink: 0; font-size: .68rem; font-weight: 700; color: rgba(241,245,249,.3); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; padding: 2px 7px; }
.cg-csearch__box:focus-within .cg-csearch__kbd { display: none; }
.cg-csearch__clear { background: none; border: 1px solid rgba(167,139,250,.4); color: #c4b5fd; border-radius: 8px; padding: 4px 12px; font: inherit; font-size: .84rem; cursor: pointer; margin-left: 6px; }
.cg-csearch__clear:hover { background: rgba(124,58,237,.14); }
.game-card[hidden] { display: none !important; }

.cg-cat-sort-item{position:relative;min-width:0;padding-top:20px;height:100%;transition:opacity .16s ease,transform .16s ease}
.cg-cat-sort-item>.game-card{height:100%;min-height:280px}
@media(min-width:900px){.game-grid.game-grid--uniform>.cg-cat-sort-item{grid-column:span 2}}
.cg-cat-sort-item.is-dragging{opacity:.42;transform:scale(.985)}
.cg-cat-sort-item.is-drag-over>.game-card{border-color:rgba(139,92,246,.8);box-shadow:0 0 0 2px rgba(124,58,237,.2),0 22px 48px rgba(0,0,0,.34)}
.cg-cat-sort-tools{position:absolute;z-index:8;top:2px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:34px 42px 34px;align-items:center;height:36px;padding:1px;border:1px solid rgba(167,139,250,.42);border-radius:11px;background:rgba(8,9,17,.94);box-shadow:0 8px 22px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.06)}
.cg-cat-sort-tools button{display:grid;place-items:center;width:100%;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#9ca3af;cursor:pointer;transition:color .14s ease,background .14s ease,box-shadow .14s ease}
.cg-cat-sort-tools button:hover{color:#fff;background:rgba(124,58,237,.2)}
.cg-cat-sort-tools button:focus-visible{outline:2px solid #a78bfa;outline-offset:2px}
.cg-cat-sort-tools svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cg-cat-sort-handle{cursor:grab!important;border-left:1px solid rgba(255,255,255,.08)!important;border-right:1px solid rgba(255,255,255,.08)!important}
.cg-cat-sort-handle:active{cursor:grabbing!important}.cg-cat-sort-handle svg{fill:currentColor;stroke:none}
.cg-cat-sort-saving::after{content:"";position:fixed;z-index:9999;right:22px;bottom:22px;width:18px;height:18px;border:2px solid rgba(255,255,255,.25);border-top-color:#a78bfa;border-radius:50%;animation:cg-cat-spin .7s linear infinite}
@keyframes cg-cat-spin{to{transform:rotate(360deg)}}
@media(max-width:720px){.cg-cat-sort-tools{grid-template-columns:38px 44px 38px;height:40px}.cg-cat-sort-tools button{height:36px}.cg-cat-sort-item{padding-top:22px}}
@media(prefers-reduced-motion:reduce){.cg-cat-sort-item,.cg-cat-sort-tools button{transition:none}.cg-cat-sort-saving::after{animation-duration:1.4s}}


.cg-arrow-picker{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:920px;margin:-8px auto 22px;padding:12px 14px;border:1px solid rgba(139,92,246,.34);border-radius:14px;background:rgba(7,8,15,.88);box-shadow:0 12px 40px rgba(0,0,0,.28)}
.cg-arrow-picker strong{color:#f1f5f9;font-size:.82rem;margin-right:4px}.cg-arrow-picker button{border:1px solid rgba(167,139,250,.28);border-radius:9px;background:rgba(255,255,255,.035);color:#a8a6b2;padding:7px 10px;font:600 .72rem/1 inherit;cursor:pointer;transition:.18s ease}.cg-arrow-picker button:hover,.cg-arrow-picker button.is-active{color:#fff;border-color:#8b5cf6;background:rgba(124,58,237,.2);box-shadow:0 0 18px rgba(124,58,237,.16)}
.cg-count-picker{margin-top:-14px}
.cg-arrow-preview .game-card-bottom{padding-right:76px}.cg-arrow-preview .game-card-cta{right:18px;bottom:18px;width:46px;height:46px;padding:0;display:grid;place-items:center;opacity:1;transform:none;border-radius:14px;color:#fff}.cg-arrow-preview .game-card-cta-text{display:none}.cg-arrow-preview .game-card-cta::after{display:none}.cg-arrow-preview .game-card-cta svg{grid-area:1/1}.cg-arrow-preview .cg-arrow-diagonal{display:none}.cg-arrow-preview .game-card:hover .game-card-cta svg{transform:none}
.cg-arrow-preview[data-arrow-style="glass"] .game-card-cta{background:rgba(8,9,17,.76);border:1px solid rgba(167,139,250,.72);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 24px rgba(0,0,0,.34)}.cg-arrow-preview[data-arrow-style="glass"] .cg-arrow-right{display:none}.cg-arrow-preview[data-arrow-style="glass"] .cg-arrow-diagonal{display:block;transform:translate(-1px,1px)}
.cg-arrow-preview[data-arrow-style="filled"] .game-card-cta{background:linear-gradient(135deg,#7c3aed,#4f46e5);border:1px solid rgba(255,255,255,.18);box-shadow:0 8px 22px rgba(91,52,210,.42)}
.cg-arrow-preview[data-arrow-style="outline"] .game-card-cta{width:42px;height:42px;border-radius:50%;background:rgba(5,6,12,.46);border:1px solid rgba(255,255,255,.48);box-shadow:0 7px 22px rgba(0,0,0,.28)}
.cg-arrow-preview[data-arrow-style="pill"] .game-card-cta{width:62px;height:34px;border-radius:999px;background:rgba(5,6,12,.68);border:1px solid rgba(139,92,246,.72);box-shadow:inset 0 1px rgba(255,255,255,.07)}
.cg-arrow-preview[data-arrow-style="neon"] .game-card-cta{width:45px;height:45px;border-radius:50%;background:rgba(32,12,68,.76);border:1px solid #c084fc;box-shadow:0 0 0 4px rgba(124,58,237,.16),0 0 22px rgba(168,85,247,.72),inset 0 0 14px rgba(168,85,247,.3)}.cg-arrow-preview[data-arrow-style="neon"] .cg-arrow-right{display:none}.cg-arrow-preview[data-arrow-style="neon"] .cg-arrow-diagonal{display:block;transform:translate(-1px,1px)}
.cg-arrow-preview[data-arrow-style="diamond"] .game-card-cta{width:40px;height:40px;border-radius:9px;background:linear-gradient(135deg,#7c3aed,#4338ca);border:1px solid rgba(255,255,255,.2);transform:rotate(45deg);box-shadow:0 8px 20px rgba(76,29,149,.4)}.cg-arrow-preview[data-arrow-style="diamond"] .game-card-cta svg{transform:rotate(-45deg)}.cg-arrow-preview[data-arrow-style="diamond"] .game-card:hover .game-card-cta svg{transform:rotate(-45deg)}
.cg-arrow-preview[data-arrow-style="corner"] .game-card-cta{width:48px;height:42px;border-radius:0;background:transparent;border-right:2px solid #a78bfa;border-bottom:2px solid #a78bfa;box-shadow:none}
.cg-arrow-preview[data-arrow-style="trail"] .game-card-cta{width:58px;height:34px;background:transparent;border:0;box-shadow:none}.cg-arrow-preview[data-arrow-style="trail"] .game-card-cta i{position:absolute;left:3px;width:6px;height:6px;border-radius:50%;background:#8b5cf6;box-shadow:0 0 12px #8b5cf6}.cg-arrow-preview[data-arrow-style="trail"] .game-card-cta::before{content:"";position:absolute;left:8px;right:27px;height:1px;background:linear-gradient(90deg,#8b5cf6,rgba(139,92,246,.15))}
/* Одна геометрическая система для всех превью: одинаковый якорь и центр SVG. */
.cg-arrow-preview .game-card-cta{right:18px;bottom:18px}
.cg-arrow-preview .game-card-cta svg,.cg-arrow-preview .game-card:hover .game-card-cta svg{position:absolute;left:50%;top:50%;margin:0;transform:translate(calc(-50% - 1px),-50%)}
.cg-arrow-preview[data-arrow-style="glass"] .cg-arrow-diagonal,.cg-arrow-preview[data-arrow-style="glass"] .game-card:hover .cg-arrow-diagonal,
.cg-arrow-preview[data-arrow-style="neon"] .cg-arrow-diagonal,.cg-arrow-preview[data-arrow-style="neon"] .game-card:hover .cg-arrow-diagonal{transform:translate(calc(-50% - 1px),calc(-50% + 1px))}
.cg-arrow-preview[data-arrow-style="diamond"] .game-card-cta svg,.cg-arrow-preview[data-arrow-style="diamond"] .game-card:hover .game-card-cta svg{transform:translate(-50%,-50%) rotate(-45deg)}
/* Админские варианты только для левого счётчика; .gcb-meta с ценой не меняется. */
.cg-arrow-preview .game-card-badge:not(.gcb-meta){position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;min-height:30px;height:auto;line-height:1;padding:8px 13px;border-radius:999px;white-space:nowrap}
.cg-arrow-preview[data-count-style="glass"] .game-card-badge:not(.gcb-meta){color:#ddd6fe;background:linear-gradient(135deg,rgba(35,22,68,.78),rgba(25,45,76,.7));border:1px solid rgba(167,139,250,.66);box-shadow:inset 0 1px rgba(255,255,255,.12),0 8px 22px rgba(0,0,0,.25)}
.cg-arrow-preview[data-count-style="solid"] .game-card-badge:not(.gcb-meta){color:#fff;background:linear-gradient(135deg,#7c3aed,#4f46e5);border:1px solid rgba(255,255,255,.16);box-shadow:0 7px 20px rgba(76,29,149,.42)}
.cg-arrow-preview[data-count-style="minimal"] .game-card-badge:not(.gcb-meta){color:rgba(255,255,255,.82);background:rgba(5,7,13,.58);border:0;border-radius:8px;box-shadow:none;padding:7px 10px}
.cg-arrow-preview[data-count-style="dot"] .game-card-badge:not(.gcb-meta){color:#ede9fe;background:rgba(7,8,15,.66);border:1px solid rgba(255,255,255,.13);box-shadow:none;padding-left:25px}.cg-arrow-preview[data-count-style="dot"] .game-card-badge:not(.gcb-meta)::before{content:"";position:absolute;left:10px;width:7px;height:7px;border-radius:50%;background:#8b5cf6;box-shadow:0 0 10px #8b5cf6}
.cg-arrow-preview[data-count-style="neon"] .game-card-badge:not(.gcb-meta){color:#f5f3ff;background:rgba(48,18,88,.7);border:1px solid #c084fc;box-shadow:0 0 0 3px rgba(139,92,246,.12),0 0 18px rgba(168,85,247,.52),inset 0 0 14px rgba(124,58,237,.22)}
.cg-arrow-preview[data-count-style="light"] .game-card-badge:not(.gcb-meta){color:#231942;background:rgba(237,233,254,.88);border:1px solid rgba(255,255,255,.7);box-shadow:0 7px 20px rgba(0,0,0,.2);font-weight:800}
.cg-arrow-preview[data-count-style="outline"] .game-card-badge:not(.gcb-meta){color:#e9d5ff;background:rgba(5,6,12,.28);border:1px solid rgba(196,181,253,.72);box-shadow:none;border-radius:10px}
.cg-arrow-preview[data-count-style="underline"] .game-card-badge:not(.gcb-meta){color:#f1f5f9;background:rgba(5,6,12,.46);border:0;border-radius:6px 6px 2px 2px;box-shadow:inset 0 -2px #8b5cf6;padding:8px 9px}

