/* ============================================================
   PLP HERO
   ============================================================ */
.rm-plp-hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--rm-border);
}
.rm-plp-hero--has-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.96) 100%),
    var(--rm-plp-hero-bg) center/cover no-repeat;
}
.rm-plp-hero--has-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(13,15,26,0.08) 0%, rgba(13,15,26,0.02) 55%, rgba(255,255,255,0) 100%),
    var(--rm-plp-hero-bg) center/cover no-repeat;
  filter: blur(18px);
  opacity: 0.45;
  transform: scale(1.08);
}
.rm-plp-hero .rm-container {
  position: relative;
  z-index: 1;
}
.rm-plp-hero__inner {
  display: grid;
  grid-template-columns: minmax(88px, 112px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 8px;
}
.rm-plp-hero__media {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.rm-plp-hero__copy {
  min-width: 0;
}
.rm-plp-hero__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 18px 40px rgba(13,15,26,0.10);
}
.rm-plp-hero__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rm-plp-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--rm-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.rm-plp-hero__count {
  display: inline-block;
  background: var(--rm-orange);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  vertical-align: middle;
  font-weight: 800;
}
.rm-plp-hero__desc {
  color: var(--rm-text-muted);
  font-size: 0.98rem;
  max-width: 720px;
  line-height: 1.6;
}

/* ============================================================
   FILTERS
   ============================================================ */
.rm-plp-filters {
  background: #fff;
  border-bottom: 1px solid var(--rm-border);
  padding: 16px 0;
}
.rm-plp-filters .rm-container {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(0, 4fr);
  gap: 12px;
  align-items: end;
}
.rm-plp-filters__toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.rm-plp-filters__panel[hidden] {
  display: none !important;
}
.rm-plp-filters__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin-top: 0;
}
.rm-plp-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rm-plp-filter-group--search {
  flex: 1 1 auto;
}
.rm-plp-filter-label {
  font-size: 0.72rem;
  color: var(--rm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}
.rm-plp-search {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--rm-border);
  border-radius: 4px;
  font-size: 0.95rem;
  background: #fff;
  transition: all var(--rm-transition);
}
.rm-plp-search:focus {
  outline: none;
  border-color: var(--rm-orange);
  box-shadow: 0 0 0 3px rgba(244,126,30,0.20);
}
.rm-plp-select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--rm-border);
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
  transition: all var(--rm-transition);
}
.rm-plp-select:focus {
  outline: none;
  border-color: var(--rm-orange);
}
.rm-plp-filters-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-width: 56px;
  border: 2px solid var(--rm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--rm-text);
  transition: border-color var(--rm-transition), box-shadow var(--rm-transition), transform var(--rm-transition);
}
.rm-plp-filters-toggle:hover,
.rm-plp-filters-toggle:focus-visible {
  border-color: var(--rm-green);
  box-shadow: 0 0 0 3px rgba(4,170,109,0.16);
  outline: none;
}
.rm-plp-filters-toggle__icon {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}
.rm-plp-filters-toggle__icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--rm-green);
}
.rm-plp-filters-toggle__icon span:nth-child(1) { width: 100%; }
.rm-plp-filters-toggle__icon span:nth-child(2) { width: 72%; margin-left: auto; }
.rm-plp-filters-toggle__icon span:nth-child(3) { width: 86%; }

/* ============================================================
   GRID — 8 columns desktop → 4 tablet → 2 mobile
   ============================================================ */
.rm-plp-container {
  padding: 32px 24px 80px;
  background: var(--rm-bg-alt);
  min-height: 60vh;
}
.rm-plp-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
}
.rm-plp-grid--compact {
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}
.rm-plp-empty {
  grid-column: 1 / -1;
  padding: 64px 24px 72px;
  text-align: center;
  color: var(--rm-text-muted);
  background: #fff;
  border-radius: 10px;
  border: 2px dashed var(--rm-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.rm-plp-empty__icon {
  font-size: 2.6rem;
  line-height: 1;
  filter: grayscale(0.2);
}

.rm-plp-empty__title {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--rm-text);
  text-transform: uppercase;
}

.rm-plp-empty__desc {
  margin: 0;
  max-width: 460px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.rm-plp-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

/* ============================================================
   GAME CARD — square cover, compact, clean border
   ============================================================ */
.rm-game-card {
  background: #fff;
  border: 1px solid var(--rm-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.rm-game-card:hover {
  border-color: var(--rm-orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(244,126,30,0.15);
}
.rm-game-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.rm-game-card .rm-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  height: auto;
  overflow: hidden;
  background: linear-gradient(180deg, #f3f6fc 0%, #edf1f8 100%);
  flex-shrink: 0;
}
.rm-game-card .rm-card__img::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(13,15,26,0) 0%, rgba(13,15,26,0.72) 100%);
  pointer-events: none;
  z-index: 1;
}
@supports not (aspect-ratio: 1 / 1) {
  .rm-game-card .rm-card__img {
    height: 0;
    padding-top: 100%;
  }
}
.rm-game-card .rm-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.rm-game-card:hover .rm-card__img img {
  transform: scale(1.06);
}
.rm-game-card__platform-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(4,170,109,0.92);
  color: #fff;
  padding: 3px 6px;
  font-size: 0.42rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(4px);
  max-width: calc(100% - 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rm-game-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13,15,26,0.86);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 22px rgba(13,15,26,0.24);
}
.rm-game-card__badge--hot {
  background: linear-gradient(135deg, #f47e1e 0%, #ff9f43 100%);
}
.rm-game-card__badge--gem {
  background: linear-gradient(135deg, #3c65c7 0%, #5a82e0 100%);
}
.rm-game-card__badge--classic {
  background: linear-gradient(135deg, #111827 0%, #24324d 100%);
}
.rm-game-card__badge--new {
  background: linear-gradient(135deg, #04aa6d 0%, #21c789 100%);
}
.rm-card__body {
  padding: 11px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}
.rm-card__eyebrow {
  color: var(--rm-text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rm-card__title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--rm-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2em;
  margin: 0;
}
.rm-game-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.rm-game-card__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  width: 100%;
}
.rm-game-card__meta .rm-badge {
  display: none; /* hide genre chip on cards — keep it clean */
}
.rm-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0;
}
.rm-rating .rm-stars {
  font-size: 0.82rem;
  color: var(--rm-orange);
  letter-spacing: 0;
  margin-inline: auto;
}
.rm-game-card__cta { display: none; }

/* ============================================================
   PAGINATION
   ============================================================ */
.rm-plp-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.rm-plp-pagination .page-numbers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  align-items: center;
}
.rm-plp-pagination .page-numbers li a,
.rm-plp-pagination .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  border: 2px solid var(--rm-border);
  border-radius: 4px;
  font-weight: 800;
  color: var(--rm-text);
  text-decoration: none;
  transition: all var(--rm-transition);
}
.rm-plp-pagination .page-numbers li a:hover {
  border-color: var(--rm-orange);
  color: var(--rm-orange);
  transform: translateY(-2px);
}
.rm-plp-pagination .page-numbers li .current {
  background: var(--rm-orange);
  border-color: var(--rm-orange);
  color: #fff;
}

.rm-plp-loading {
  padding: 32px;
  text-align: center;
  color: var(--rm-orange);
}
.rm-plp-loading[hidden] {
  display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .rm-plp-filters .rm-container { grid-template-columns: 1fr; }
  .rm-plp-filters__inner { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 1024px) {
  .rm-plp-grid,
  .rm-plp-grid--compact { grid-template-columns: repeat(6, 1fr); gap: 10px; }
}
@media (max-width: 768px) {
  .rm-plp-hero__inner {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .rm-plp-hero__media {
    align-items: flex-start;
  }
  .rm-plp-hero__logo-wrap {
    width: 72px;
    height: 72px;
    padding: 12px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(13,15,26,0.08);
  }
  .rm-plp-hero__title {
    font-size: clamp(1.3rem, 7vw, 1.95rem);
    gap: 8px;
    margin-bottom: 8px;
  }
  .rm-plp-hero__count {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
  .rm-plp-hero__desc {
    font-size: 0.92rem;
  }
  .rm-plp-grid,
  .rm-plp-grid--compact { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
@media (max-width: 640px) {
  .rm-plp-hero {
    padding: 18px 0 24px;
  }
  .rm-plp-hero__inner {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }
  .rm-plp-hero__media {
    justify-content: flex-start;
  }
  .rm-plp-hero__logo-wrap {
    width: 72px;
    height: 72px;
  }
  .rm-plp-hero__title {
    display: block;
  }
  .rm-plp-hero__count {
    margin-top: 10px;
  }
  .rm-plp-filters {
    padding: 12px 0;
  }
  .rm-plp-filters .rm-container {
    display: block;
  }
  .rm-plp-filters__toolbar {
    gap: 8px;
  }
  .rm-plp-filters-toggle {
    display: inline-flex;
    width: calc(20% - 4px);
    min-width: 54px;
  }
  .rm-plp-filter-group--search {
    flex: 0 0 calc(80% - 4px);
  }
  .rm-plp-filters__inner {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rm-border);
  }
  .rm-plp-search {
    padding: 12px 14px;
  }
  .rm-plp-grid,
  .rm-plp-grid--compact { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rm-card__title { font-size: 0.72rem; }
  .rm-card__eyebrow { font-size: 0.58rem; }
  .rm-game-card__action { display: none; }
}

/* ============================================================
   SKELETON CARDS — shown while AJAX filter is loading
   ============================================================ */
.rm-skeleton-card {
  background: #fff;
  border: 2px solid var(--rm-border, #d7e2f4);
  border-radius: 8px;
  overflow: hidden;
  padding: 0 0 12px;
}
.rm-skeleton-card__cover {
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, #eef2f9 0%, #f7fafd 50%, #eef2f9 100%);
  background-size: 200% 100%;
  animation: rm-skeleton-shimmer 1.2s linear infinite;
}
.rm-skeleton-card__line {
  height: 12px;
  margin: 12px 14px 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef2f9 0%, #f7fafd 50%, #eef2f9 100%);
  background-size: 200% 100%;
  animation: rm-skeleton-shimmer 1.2s linear infinite;
}
.rm-skeleton-card__line--short { width: 55%; }
@keyframes rm-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-skeleton-card__cover,
  .rm-skeleton-card__line { animation: none; }
}

/* ============================================================
   PLATFORM LANDING HERO STRIP
   ============================================================ */
.rm-platform-hero-strip {
  background: var(--rm-bg-alt, #f7f8fa);
  border-bottom: 2px solid var(--rm-border, #e4e7ef);
  padding: 28px 0 32px;
}
.rm-platform-hero-strip__label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--rm-text-muted, #6b7280);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.rm-platform-hero-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.rm-platform-hero-card {
  background: #fff;
  border: 2px solid var(--rm-border, #e4e7ef);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rm-platform-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--rm-blue, #3c65c7);
}
.rm-platform-hero-card--orange::before { background: var(--rm-orange, #f47e1e); }
.rm-platform-hero-card--green::before  { background: var(--rm-green, #04aa6d); }
.rm-platform-hero-card--neutral::before { background: var(--rm-blue-dark, #12213f); }
.rm-platform-hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(18,33,63,0.10);
}
.rm-platform-hero-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.rm-platform-hero-card__emoji { font-size: 1.3rem; }
.rm-platform-hero-card__heading {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rm-blue, #3c65c7);
}
.rm-platform-hero-card--orange .rm-platform-hero-card__heading { color: var(--rm-orange, #f47e1e); }
.rm-platform-hero-card--green  .rm-platform-hero-card__heading { color: var(--rm-green, #04aa6d); }
.rm-platform-hero-card--neutral .rm-platform-hero-card__heading { color: var(--rm-blue-dark, #12213f); }
.rm-platform-hero-card__name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rm-text, #1a1d2e);
  line-height: 1.2;
}
.rm-platform-hero-card__desc {
  font-size: 0.88rem;
  color: var(--rm-text-muted, #6b7280);
  line-height: 1.5;
  margin: 2px 0 10px;
  flex-grow: 1;
}
.rm-platform-hero-card__cta { margin-top: auto; align-self: flex-start; }
@media (max-width: 768px) {
  .rm-platform-hero-strip__grid { grid-template-columns: 1fr; gap: 12px; }
}
