/* ============================================
   Category Page Styles
   ============================================ */

.cat-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  margin-top: 24px;
}

/* Sidebar */
.side {
  border: 1px solid var(--border-dim);
  background: var(--bg-panel);
  padding: 16px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  align-self: start;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.side h3 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-dim);
  display: flex; align-items: center; gap: 6px;
}
.side h3::before {
  content: '▸';
  color: var(--neon-magenta);
}
.side + .side { margin-top: 16px; }
.side .filter-block {
  margin-bottom: 20px;
}
.side .filter-block:last-child { margin-bottom: 0; }
.side .chip-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.side .price-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}
.side input[type="range"] {
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  outline: none;
}
.side input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px; height: 14px;
  background: var(--neon-cyan);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: var(--glow-cyan-sm);
  cursor: pointer;
}
.side .side-btn {
  width: 100%;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
  background: transparent;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.side .side-btn:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
}
.side .checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side .checkbox-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}
.side .checkbox-row label:hover { color: var(--neon-cyan); }
.side .checkbox-row input {
  appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--border-dim);
  background: transparent;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.side .checkbox-row input:checked {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
}
.side .checkbox-row input:checked::after {
  content: '✓';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #060614;
  font-size: 10px;
  font-weight: 900;
}

/* Right panel */
.right {
  min-width: 0;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.toolbar .count-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.toolbar .count-info b {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan-sm);
  font-weight: 700;
  padding: 0 2px;
}
.toolbar .sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.toolbar select {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-cyan);
  background: var(--bg-elev);
  border: 1px solid var(--border-dim);
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.toolbar select:focus { border-color: var(--neon-cyan); box-shadow: var(--glow-cyan-sm); }
.toolbar .view-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-dim);
}
.toolbar .view-toggle button {
  padding: 4px 8px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.toolbar .view-toggle button.active {
  background: var(--neon-cyan);
  color: #060614;
  box-shadow: var(--glow-cyan-sm);
}

/* Breadcrumb */
.crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumb a { color: var(--neon-cyan); }
.crumb a:hover { text-shadow: var(--glow-cyan-sm); }
.crumb .sep { color: var(--neon-magenta); }

/* Page title */
.page-hero {
  padding: 24px 24px;
  border: 1px solid var(--border-dim);
  background:
    linear-gradient(135deg, rgba(255,46,136,0.08), rgba(0,229,255,0.08)),
    var(--bg-panel);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  right: -60px; top: -40px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,229,255,0.15), transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(0,229,255,0.3);
}
.page-hero h1 .accent {
  color: var(--neon-magenta);
  text-shadow: 0 0 12px rgba(255,46,136,0.6);
}
.page-hero p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  max-width: 640px;
}

/* Games grid on category page */
.cat-grid-out {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.cat-grid-out.list-view {
  grid-template-columns: 1fr;
}
.cat-grid-out.list-view .card {
  flex-direction: row;
  align-items: stretch;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.cat-grid-out.list-view .card .cover {
  width: 320px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
}
.cat-grid-out.list-view .card .info {
  flex-direction: column;
  padding: 16px 20px;
}
.cat-grid-out.list-view .card .info .title {
  font-size: 18px;
  white-space: normal;
}

/* Empty state */
.empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed var(--border-dim);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.empty .code {
  color: var(--neon-magenta);
  display: block;
  margin-top: 8px;
  font-size: 11px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  font-family: var(--font-mono);
}
.pagination button, .pagination span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
  background: transparent;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  transition: all 0.2s;
  cursor: pointer;
}
.pagination button:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
}
.pagination button.active {
  color: #060614;
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan-sm);
}
.pagination span.ellipsis {
  border: none;
  cursor: default;
}

@media (max-width: 1024px) {
  .cat-page { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .cat-grid-out.list-view .card { flex-direction: column; }
  .cat-grid-out.list-view .card .cover { width: 100%; }
}
