/* ==========================================================================
   IN7 GAME — Games catalogue page
   Search hero · category tabs · toolbar · grid · context panel · guides
   ========================================================================== */

/* ---------- Catalogue hero ---------- */
.cat-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem) clamp(2rem, 1.5rem + 2.5vw, 3rem);
  background:
    radial-gradient(ellipse 60% 100% at 15% 0%, rgba(238, 223, 174, .55), transparent 62%),
    radial-gradient(ellipse 50% 90% at 88% 30%, rgba(251, 233, 236, .75), transparent 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-border-soft);
}

.cat-hero__inner { position: relative; z-index: var(--z-raised); }
.cat-hero__title { font-size: var(--fs-h1); margin-block: 1rem .95rem; max-width: 20ch; }
.cat-hero__lead { max-width: 62ch; font-size: var(--fs-lead); color: var(--color-text-muted); line-height: var(--lh-loose); }

.cat-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, .5rem + 2vw, 2.5rem);
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
}
.cat-hero__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
}
.cat-hero__stat span {
  display: block;
  margin-top: .35rem;
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}

/* ---------- Sticky filter bar ---------- */
.catalog-bar {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  padding-block: 1rem;
  background: rgba(250, 247, 240, .93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
@media (max-width: 1080px) { .catalog-bar { top: var(--header-h-mobile); } }

/* Category tabs */
.cat-tabs {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding-bottom: .35rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cat-tabs::-webkit-scrollbar { height: 4px; }
.cat-tabs::-webkit-scrollbar-thumb { background: var(--color-gold-light); border-radius: 4px; }

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  padding: .62rem 1.05rem;
  border-radius: var(--r-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  transition: all var(--t-base) var(--ease-out);
}
.cat-tab:hover { border-color: var(--color-gold); background: var(--color-gold-wash); }
.cat-tab.is-active {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-text-invert);
  box-shadow: var(--shadow-card);
}
.cat-tab__count {
  padding: .1rem .45rem;
  border-radius: var(--r-pill);
  background: var(--color-gold-wash);
  border: 1px solid var(--color-gold-light);
  font-size: .65rem;
  font-weight: 700;
  color: var(--color-gold-deep);
}
.cat-tab.is-active .cat-tab__count {
  background: rgba(201, 162, 39, .2);
  border-color: rgba(201, 162, 39, .5);
  color: var(--color-gold-light);
}

/* Search + sort row */
.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: .85rem;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}
.search-field svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.search-field input {
  width: 100%;
  padding: .8rem 1rem .8rem 2.8rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.search-field input::placeholder { color: var(--color-text-muted); }
.search-field input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold-glow);
}

.select-field {
  position: relative;
  flex: 0 0 auto;
}
.select-field select {
  appearance: none;
  -webkit-appearance: none;
  padding: .8rem 2.6rem .8rem 1.15rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.select-field select:focus { outline: none; border-color: var(--color-gold); box-shadow: var(--shadow-gold-glow); }
.select-field::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.catalog-count {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .catalog-tools { gap: .6rem; }
  .select-field, .search-field { flex: 1 1 100%; }
  .select-field select { width: 100%; }
}

/* ---------- Category context panel ---------- */
.cat-panel {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  margin-bottom: clamp(1.75rem, 1rem + 2vw, 2.75rem);
  border-radius: var(--r-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  border-top: 3px solid transparent;
  border-image: var(--grad-gold) 1;
  border-image-slice: 1;
  border-image-width: 3px 0 0 0;
}
.cat-panel[hidden] { display: none; }
.cat-panel__title { font-size: var(--fs-h3); margin-bottom: .85rem; }
.cat-panel__lead {
  font-size: var(--fs-lead);
  color: var(--color-text-primary);
  line-height: var(--lh-loose);
  margin-bottom: 1rem;
}
.cat-panel__body {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-loose);
}

.cat-panel__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, .75rem + 2vw, 2.5rem);
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--color-border);
}
@media (max-width: 760px) { .cat-panel__cols { grid-template-columns: 1fr; } }

.cat-panel__sub {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-bottom: .85rem;
}
.cat-panel__list { margin: 0; padding-left: 1.25rem; }
.cat-panel__list li {
  margin-bottom: .7rem;
  font-size: var(--fs-sm);
  color: var(--color-text-body);
  line-height: var(--lh-loose);
}
.cat-panel__list li::marker { color: var(--color-gold-deep); font-weight: 700; }
.cat-panel__list--tips { list-style: none; padding-left: 0; }
.cat-panel__list--tips li {
  position: relative;
  padding-left: 1.6rem;
}
.cat-panel__list--tips li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-gold);
}

/* ---------- Grid states ---------- */
.catalog-empty {
  padding: 3.5rem 1.5rem;
  text-align: center;
  border-radius: var(--r-xl);
  border: 1px dashed var(--color-border);
  background: var(--color-surface);
}
.catalog-empty[hidden] { display: none; }
.catalog-empty h3 { margin-block: 1rem .6rem; }
.catalog-empty p { color: var(--color-text-muted); font-size: var(--fs-sm); max-width: 44ch; margin-inline: auto; }

.catalog-more { margin-top: 2.5rem; text-align: center; }
.catalog-more [hidden] { display: none; }

/* ---------- Provider strip ---------- */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .85rem;
}
.provider-chip {
  display: grid;
  gap: .25rem;
  padding: 1.15rem 1.1rem;
  border-radius: var(--r-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  transition: all var(--t-base) var(--ease-out);
}
.provider-chip:hover { border-color: var(--color-gold); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.provider-chip b { font-family: var(--font-display); font-size: var(--fs-sm); color: var(--color-text-primary); }
.provider-chip span { font-size: var(--fs-tiny); color: var(--color-text-muted); line-height: 1.6; }

/* ---------- Guide cards ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, .6rem + 1.4vw, 1.6rem);
}
@media (max-width: 960px) { .guide-grid { grid-template-columns: 1fr; } }

.guide {
  position: relative;
  padding: clamp(1.4rem, 1rem + 1vw, 1.9rem);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}
.guide__num {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 1rem;
  border-radius: var(--r-sm);
  background: var(--color-black);
  color: var(--color-gold-light);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-sm);
}
.guide h3 { font-size: var(--fs-h4); margin-bottom: .7rem; }
.guide p { font-size: var(--fs-sm); color: var(--color-text-muted); line-height: var(--lh-loose); }
.guide p + p { margin-top: .75rem; }
