/* صفحه دسته‌بندی — تامنیل افقی کم‌ارتفاع (۴:۱)
 * اندازه پیشنهادی فایل تصویر: 1200×300 px (حداقل 800×200 | Retina: 1600×400)
 * فرمت: JPG/WebP — سوژه مهم وسط تصویر باشد (برش cover) */
.cats-page {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
}

.cats-page__loading {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.cats-page__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 0.85rem;
  border: 1px dashed rgba(255, 214, 10, 0.2);
  background: rgba(12, 10, 6, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ——— لودینگ دسته‌بندی ——— */

.cats-load {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 0.25rem 0 0.5rem;
  animation: catsLoadFadeIn 0.45s ease backwards;
}

.cats-load__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 16rem;
  margin-inline: auto;
  padding: 1.15rem 1rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 214, 10, 0.2);
  background: rgba(12, 10, 6, 0.55);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cats-load__spinner {
  position: relative;
  width: 4.25rem;
  height: 4.25rem;
  display: grid;
  place-items: center;
}

.cats-load__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.cats-load__ring--outer {
  border-top-color: var(--y-hot, #ffc107);
  border-right-color: rgba(255, 193, 7, 0.35);
  animation: catsLoadSpin 1.1s linear infinite;
}

.cats-load__ring--inner {
  inset: 0.55rem;
  border-bottom-color: #fff0a8;
  border-left-color: rgba(255, 255, 255, 0.1);
  animation: catsLoadSpin 0.75s linear infinite reverse;
}

.cats-load__core {
  position: relative;
  z-index: 1;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.95rem;
  color: var(--y-hot, #ffc107);
  background: rgba(255, 214, 10, 0.1);
  border: 1px solid rgba(255, 214, 10, 0.28);
  animation: catsLoadPulse 1.6s ease-in-out infinite;
}

.cats-load__text {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 900;
  color: #fef3c7;
}

.cats-load__dots {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: 0.5rem;
}

.cats-load__dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--y-hot, #ffc107);
  opacity: 0.35;
  animation: catsLoadDot 1.2s ease-in-out infinite;
}

.cats-load__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.cats-load__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.cats-load__skels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}

.cats-load__skel {
  aspect-ratio: 4 / 1;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 214, 10, 0.1);
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.03) 8%,
    rgba(255, 214, 10, 0.14) 18%,
    rgba(255, 255, 255, 0.03) 33%
  );
  background-size: 200% 100%;
  animation: catsLoadShimmer 1.4s ease-in-out infinite, catsLoadSkelIn 0.5s ease backwards;
}

@keyframes catsLoadFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes catsLoadSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes catsLoadPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes catsLoadDot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0) scale(0.85);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px) scale(1);
  }
}

@keyframes catsLoadSkelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes catsLoadShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cats-load,
  .cats-load__ring,
  .cats-load__core,
  .cats-load__dots span,
  .cats-load__skel {
    animation: none !important;
  }
}

.cats-page__crumb {
  margin: 0;
}

.cats-page__crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cats-page__crumb-list a {
  color: var(--y-core);
  text-decoration: none;
  font-weight: 600;
}

.cats-page__crumb-list a:hover {
  color: var(--y-hot);
}

.cats-page__crumb-list li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.5rem;
  opacity: 0.45;
}

.cats-page__crumb-list li[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
}

.cats-page__head {
  margin: 0;
}

.cats-page__title {
  margin: 0;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cats-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.cats-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 1;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cats-tile .pack-pixel-wave__fx {
  z-index: 2;
  border-radius: inherit;
}

.cats-tile:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.cats-tile:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.cats-tile.is-focus {
  border-color: rgba(255, 214, 10, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 214, 10, 0.2);
}

.cats-tile.is-pack-wave {
  transform: translateZ(0);
}

.cats-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.cats-tile:hover .cats-tile__img {
  transform: scale(1.04);
}

@media (min-width: 48rem) {
  .cats-page__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}
