/* [buymenu] Kategóriás fegyverbolt (B) + a menük kategória-sávja (Felszerelés-szerkesztő, Piactér) – B · Műszak tokenekkel.
   Mozgás: csak translate / scale / opacity (kompozitor); a kiemelő „pill” a kiválasztott fül mögé csúszik; csökkentett mozgásnál
   nincs csúszás. A régi .shop-card / .sc-* alapok a style.css-ben maradnak, ez csak kiegészít / felülír. */

/* ---------- a B-bolt doboza: teljes magasság, a belső részek görgetnek ---------- */
#shop .shop-box { width: min(1500px, 100%); height: min(880px, 100%); display: flex; flex-direction: column; overflow: hidden; padding: 0 var(--s5) var(--s4); }
#shop .shop-title { flex: none; position: relative; background: none; }
#shop #shopBody { flex: 1; min-height: 0; }
.bm { --bm-rail: 284px; --bm-det: 340px; display: grid; grid-template-columns: var(--bm-rail) minmax(0, 1fr) var(--bm-det); grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head head head" "rail main det" "keys keys keys"; gap: var(--s3) var(--s5); height: 100%; min-height: 0; }
.bm h4, .bm h5 { margin: 0; }
.bm .shop-head { grid-area: head; min-height: 40px; }
.bm .shop-money { font-family: var(--f-disp); font-weight: 800; font-size: 36px; line-height: 1; letter-spacing: .01em; transform-origin: 0 60%; }
.bm .shop-note { flex-basis: 100%; }

/* ---------- kategória-sáv ---------- */
.bm-rail { grid-area: rail; position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 1px; }
.bm-rail::-webkit-scrollbar { display: none; }
.bm-ind { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; background: var(--fill-3); pointer-events: none; z-index: 0;
  transition: translate .34s var(--ease-film), scale .34s var(--ease-film); }
.bm-tab { all: unset; box-sizing: border-box; position: relative; z-index: 1; display: grid; grid-template-columns: 22px 60px minmax(0, 1fr); align-items: center; gap: 10px;
  height: 60px; padding: 0 12px 0 10px; border-radius: var(--r-sm); color: var(--ink-2); cursor: pointer; }
.bm-tab::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--light); transform: scaleY(0); transition: transform .26s var(--ease-film); }
.bm-tab:hover { color: var(--ink); }
.bm-tab[aria-selected="true"] { color: var(--ink); }
.bm-tab[aria-selected="true"]::before { transform: scaleY(1); }
.bm-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.bm-ti { display: grid; place-items: center; height: 30px; }
.bm-ti img { display: block; width: 60px; height: 30px; object-fit: contain; opacity: .62; filter: grayscale(.5) drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); transition: opacity var(--t) var(--ease), filter var(--t) var(--ease), translate .3s var(--ease-film); }
.bm-ti svg { width: 24px; height: 24px; color: var(--ink-2); }
.bm-tab:hover .bm-ti img, .bm-tab[aria-selected="true"] .bm-ti img { opacity: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.bm-tab[aria-selected="true"] .bm-ti img { translate: 3px 0; }
.bm-tn { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); min-width: 0; }
.bm-tn b { font-family: var(--f-disp); font-weight: 800; font-size: 21px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-tn small { flex: none; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* számbillentyűk: a következő lépés számai világítanak (kategória-szinten a fülek, elem-szinten a kártyák) */
.bm-k { min-width: 20px; color: var(--muted); transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.bm[data-level="cat"] .bm-tab .bm-k, .bm[data-level="item"] .bm-pane .bm-k { color: var(--on-paper); background: var(--light); box-shadow: none; }
.bm-c .bm-k { display: none; }

/* ---------- rács ---------- */
.bm-main { grid-area: main; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 6px 8px 2px; scrollbar-width: thin; }
.bm-ph-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s3); }
.bm-ph-h h4 { font-family: var(--f-disp); font-weight: 900; font-size: 40px; line-height: .9; letter-spacing: 0; text-transform: uppercase; color: var(--ink); }
.bm-hint { font-size: 12px; color: var(--muted); }
.bm-sub { margin: var(--s4) 0 var(--s2) !important; font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bm-ph-h + .bm-sub { margin-top: 0 !important; }
#shop .bm-grid:not(.gear-grid), .bm-grid:not(.gear-grid) { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
#shop .bm-grid.gear-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.bm .shop-card { overflow: hidden; contain: layout paint; }
.bm .shop-card .bm-k { position: absolute; top: 8px; left: 8px; z-index: 1; }
.bm .shop-card img { margin-top: 2px; }
.bm .shop-card.cur { border-color: var(--light); box-shadow: inset 0 0 0 1px var(--light); background: var(--fill-2); }
.bm .shop-card.cur img { transform: scale(1.04); }
.bm .shop-card.sel { border-color: rgba(245, 242, 236, .55); }
.bm .shop-card.sel.cur { border-color: var(--light); }
.bm .sc-state.sel svg { width: 13px; height: 13px; margin-right: 4px; }
.bm .sc-bar { grid-template-columns: 64px minmax(0, 1fr); }
.bm .sc-bar b { transform-origin: 0 50%; width: 100%; }
.bm .shop-card.poor .sc-bar b { background: rgba(245, 242, 236, .45); }
.bm-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent 10%, rgba(243, 162, 91, .42) 50%, transparent 90%); }
.bm .gear-ico { display: grid; place-items: center; height: 54px; }

/* ---------- részletek ---------- */
.bm-det { grid-area: det; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--s3); padding: 2px 0 2px var(--s5); border-left: 1px solid var(--line); scrollbar-width: thin; }
.bm-empty { color: var(--muted); font-size: 13px; }
.bm-d-img { display: grid; place-items: center; min-height: 128px; background: radial-gradient(ellipse 60% 55% at 50% 58%, var(--light-t), transparent 72%); }
.bm-d-img img { display: block; width: 100%; aspect-ratio: 12 / 5; object-fit: contain; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .6)); }
.bm-d-img.gear-ico svg { width: 96px; height: 96px; color: var(--ink-2); }
.bm-d-h small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bm-d-h h3 { margin: 4px 0 0; font-family: var(--f-disp); font-weight: 900; font-size: 36px; line-height: .92; text-transform: uppercase; letter-spacing: 0; }
.bm-d-desc { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.bm-d-bars { display: grid; gap: 7px; }
.bm-dbar { display: grid; grid-template-columns: 92px minmax(0, 1fr) 78px; align-items: center; gap: var(--s2); font-size: 12px; color: var(--muted); }
.bm-dbar i { height: 4px; background: rgba(245, 242, 236, .1); overflow: hidden; }
.bm-dbar b { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; }
.bm-dbar em { font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink); text-align: right; white-space: nowrap; }
.bm-d-act { margin-top: auto; display: grid; gap: 6px; padding-top: var(--s2); }
.bm-buy { width: 100%; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 0 var(--s4); font-weight: 700; }
.bm-buy span { margin-right: auto; }
.bm-buy svg { width: 16px; height: 16px; }
.bm-buy kbd { background: rgba(0, 0, 0, .12); color: inherit; box-shadow: none; }
.bm-buy[aria-disabled="true"] { opacity: .5; }
.bm-after { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); text-align: right; }
.bm-after.poor { color: var(--bad); }

/* ---------- billentyűsor ---------- */
.bm-keys { grid-area: keys; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: var(--s2); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.bm-keys > span { white-space: nowrap; }

/* ---------- kompakt (halál-képernyő) ---------- */
.bm-c { display: block; height: auto; }
.bm-c .shop-head { min-height: 32px; margin-bottom: var(--s2); }
.bm-c .shop-money { font-size: 26px; }
.bm-c .bm-rail { flex-direction: row; overflow-x: auto; overflow-y: hidden; margin: 0 0 var(--s2); }
.bm-c .bm-tab { flex: none; grid-template-columns: 40px auto; height: 38px; gap: 6px; padding: 0 10px 0 6px; }
.bm-c .bm-tab::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; transform: scaleX(0); }
.bm-c .bm-tab[aria-selected="true"]::before { transform: scaleX(1); }
.bm-c .bm-ti img { width: 40px; height: 20px; }
.bm-c .bm-ti svg { width: 18px; height: 18px; }
.bm-c .bm-tn b { font-size: 15px; }
.bm-c .bm-tn small { display: none; }
.bm-c .bm-main { overflow: visible; padding: 0; }
.bm-c .bm-ph-h { display: none; }
.bm-c .bm-grid:not(.gear-grid) { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

/* ---------- keskeny képernyő: egy oszlop, vízszintes kategória-sáv, részletek nélkül (koppintás = vétel) ---------- */
@media (max-width: 900px) {
  .bm { --bm-det: 0px; grid-template-columns: var(--bm-rail) minmax(0, 1fr); grid-template-areas: "head head" "rail main" "keys keys"; }
  .bm-det { display: none; }
}
@media (max-width: 700px) {
  #shop { padding: 0; }
  #shop .shop-box { width: 100%; height: 100%; border-radius: 0; padding: 0 var(--s3) var(--s2); }
  #shop .shop-title { padding: var(--s3) 0 var(--s2); margin: 0; }
  #shop .shop-title h2 { font-size: 30px; }
  .bm { display: flex; flex-direction: column; gap: var(--s2); }
  .bm .shop-head { min-height: 0; }
  .bm .shop-money { font-size: 28px; }
  .bm-rail { flex: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .bm-tab { flex: none; grid-template-columns: auto 40px auto; height: 44px; gap: 6px; padding: 0 10px 0 6px; }
  .bm-tab::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 2px; transform: scaleX(0); }
  .bm-tab[aria-selected="true"]::before { transform: scaleX(1); }
  .bm-ti img { width: 40px; height: 20px; }
  .bm-ti svg { width: 18px; height: 18px; }
  .bm-tn b { font-size: 16px; }
  .bm-tn small { display: none; }
  .bm-main { flex: 1; padding: 0; }
  .bm-ph-h h4 { font-size: 28px; }
  .bm-hint, .bm-keys { display: none; }
  #shop .bm-grid:not(.gear-grid), .bm-grid:not(.gear-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shop .bm-grid.gear-grid { grid-template-columns: 1fr; }
  .bm .shop-card { padding: var(--s2); }
  .bm .sc-bar { grid-template-columns: 46px minmax(0, 1fr); font-size: 9.5px; height: 10px; }
  .bm .shop-card .sc-cls { display: none; }
}
@media (hover: none) and (pointer: coarse) { .bm .bm-k, .bm-keys, .bm-buy kbd { display: none; } }   /* érintőképernyőn nincs billentyű-jelzés */
@media (prefers-reduced-motion: reduce) {
  .bm-ind, .bm-tab::before, .bm-ti img { transition: none; }
}
:root[data-anim="reduced"] .bm-ind, :root[data-anim="reduced"] .bm-tab::before { transition: none; }

/* ---------- a menük kategória-sávja (Felszerelés-szerkesztő, Piactér): ugyanaz a nyelv kicsiben ---------- */
.wcat-bar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 var(--s3); }
.wcat-bar::-webkit-scrollbar { display: none; }
.wcat { all: unset; box-sizing: border-box; position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 12px 0 8px; border-radius: var(--r-sm);
  color: var(--ink-2); background: var(--fill); cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.wcat::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: var(--light); transform: scaleX(0); transition: transform .26s var(--ease-film); }
.wcat:hover { color: var(--ink); background: var(--fill-2); }
.wcat[aria-checked="true"], .wcat[aria-selected="true"] { color: var(--ink); background: var(--fill-3); }
.wcat[aria-checked="true"]::after, .wcat[aria-selected="true"]::after { transform: scaleX(1); }
.wcat:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wcat img { width: 40px; height: 18px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.wcat b { font-family: var(--f-disp); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.wcat small { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }
.wcat-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: var(--s2); margin: var(--s3) 0 0; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wcat-h:first-child { margin-top: 0; }
.wcat-h::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }
