/* แถบหมวด + เมนูค่ายเกมบนหัวเว็บ (#catNav, จอคอม) */

/* ---------- แถบหมวด + เมนูค่ายเกม (จอคอม) ---------- */
#catNav { display: none; border-top: 1px solid rgba(255,255,255,.05); background: linear-gradient(180deg, #170e0b, #120b09); }
@media (min-width: 1024px) {
  #catNav { display: block; }
  #categories { display: none; }
  html { scroll-padding-top: 146px; }
}
.cnav { display: flex; justify-content: center; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
.cnav-item { flex: 1 1 0; max-width: 156px; }
.cnav-link { position: relative; display: flex; height: 70px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #d6d3d1; font-size: 14px; white-space: nowrap; transition: color .2s ease, background-color .2s ease; }
.cnav-link img { width: 30px; height: 30px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); transition: transform .25s ease, filter .25s ease; }
.cnav-link::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #ffe08a, #f5b301); transform: scaleX(0); transition: transform .25s ease; }
.cnav-link:hover, .cnav-item.open > .cnav-link, .cnav-link.is-active { color: #ffe08a; background: radial-gradient(ellipse 70% 90% at 50% 100%, rgba(245,179,1,.2), transparent 70%), rgba(255,255,255,.025); }
.cnav-link:hover::after, .cnav-item.open > .cnav-link::after, .cnav-link.is-active::after { transform: scaleX(1); }
.cnav-link:hover img, .cnav-item.open > .cnav-link img { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 3px 3px rgba(0,0,0,.6)) drop-shadow(0 0 6px rgba(245,179,1,.55)); }
.cnav-chev { position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; opacity: .45; transition: transform .25s ease, opacity .2s; }
.cnav-item.open .cnav-chev { transform: rotate(180deg); opacity: 1; }
.mega { position: absolute; left: 0; right: 0; top: 100%; padding: 0 1rem; opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.cnav-item.open > .mega, .cnav-item:focus-within > .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* รับเมาส์เฉพาะตัวกล่องเมนู ไม่รับพื้นที่โปร่งใสรอบ ๆ (ไม่งั้นเมาส์ออกนอกกล่องแล้วเมนูไม่ปิด) */
.cnav-item.open > .mega .mega-in, .cnav-item:focus-within > .mega .mega-in { pointer-events: auto; }
.mega-in { max-width: 78rem; max-height: calc(100vh - 170px); margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 22px; border: 1px solid rgba(255,224,138,.22); border-top: 2px solid #e9b23a; border-radius: 0 0 10px 10px;
  background: radial-gradient(ellipse 55% 100% at 50% 0%, rgba(214,160,60,.16), transparent 70%), url(../../images/bg/pattern.svg) center top / 200px 200px repeat, linear-gradient(180deg, #1e140f, #130c0a);
  box-shadow: 0 26px 44px -14px rgba(0,0,0,.9); scrollbar-width: thin; scrollbar-color: rgba(233,178,58,.5) transparent; }
.mega-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; }
.mega-grid.dense { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 2px 10px; }
/* ภาพตัวละคร (350x202 พื้นโปร่งใส) วางทับแคปซูล ตัวละครจึงโผล่พ้นขอบบนแบบใน c.png */
.prov-card { position: relative; display: block; aspect-ratio: 350 / 202; isolation: isolate; }
.prov-card::before { content: ""; position: absolute; left: 1%; right: 1%; top: 30%; bottom: 3%; z-index: -1; border-radius: 999px;
  background: radial-gradient(ellipse 60% 120% at 72% 120%, rgba(245,179,1,.22), transparent 62%), linear-gradient(180deg, #2c2119, #120d0a);
  box-shadow: inset 0 0 0 1px rgba(255,224,138,.3), inset 0 1px 0 rgba(255,255,255,.08), 0 10px 16px -10px #000; transition: box-shadow .25s ease; }
.prov-card::after { content: ""; position: absolute; left: 1%; right: 1%; top: 30%; bottom: 3%; z-index: -1; border-radius: 999px; overflow: hidden; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,241,194,.2) 50%, transparent 65%) no-repeat; background-size: 60% 100%; background-position: -120% 0; }
.prov-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 30% 100%; transition: transform .3s ease, filter .3s ease; filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }
.prov-card:hover::before, .prov-card:focus-visible::before { box-shadow: inset 0 0 0 1.5px #ffe08a, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px rgba(245,179,1,.38), 0 10px 18px -10px #000; }
.prov-card:hover::after, .prov-card:focus-visible::after { animation: cardShine .8s ease-out; }
@keyframes cardShine { from { background-position: -120% 0; } to { background-position: 220% 0; } }
.prov-card:hover img, .prov-card:focus-visible img { transform: translateY(-3px) scale(1.04); filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)) brightness(1.06); }
.prov-card:focus-visible { outline: none; }
.cnav-item.open .mega-grid > li { animation: pillIn .32s ease-out both; animation-delay: calc(var(--i) * 16ms); }
@keyframes pillIn { from { opacity: 0; transform: translateY(8px); } }
