.catcard-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: calc(76vh - var(--header-height) - 60px);
}

.catcard-nav {
  display: flex;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.catcard-back-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.catcard-back-btn:hover {
  background: rgba(var(--surface-color-rgb), 0.6);
  transform: translateY(-1px);
}

.catcard-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.catcard-back-btn:hover .catcard-nav-icon {
  transform: translateX(-4px);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
}

.dropbtn::after {
  content: "▼";
  font-size: 0.7em;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.dropbtn:hover {
  background: rgba(var(--surface-color-rgb), 0.6);
  border-color: var(--primary-color);
}

.dropdown.active .dropbtn::after {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 2rem);
  right: -18px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  min-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1000;
  overflow: hidden;
}

.dropdown-content-header {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-content-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dropdown-content a {
  color: var(--text-color);
  padding: 9px 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  font-size: 14px;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.04);
  padding-left: 14px;
}

.dropdown-icon-wrap {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dropdown-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.dropdown-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.catcard-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  position: relative;
}

.catcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  animation: enter 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.catcard {
  position: relative;
  background: rgba(var(--surface-color-rgb), 0.8);
  min-height: 340px;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.catcard::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0) 70%);
  transform: translate(100%, -100%) rotate(270deg);
  transition: transform 1.7s ease;
  pointer-events: none;
}

.catcard:hover::before {
  transform: translate(-100%, 100%) rotate(270deg);
}

.catcard-index.empty {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.04);
  font-style: italic;
}

.catcard-index.empty i {
  color: var(--text-muted);
}

.catcard a {
  text-decoration: none;
  width: 100%;
}

.catcard:hover {
  transform: translateY(-10px);
}

.catcard-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.catcard-image-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: white;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.catcard-image-container img {
  width: 100%;
  height: 95%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.4s ease;
}

.catcard-labels {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.catcard-new-label {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-color);
}

.catcard-new-label i {
  font-size: 11px;
  line-height: 0.8;
}

.catcard-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.catcard-footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catcard-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 7px 10px;
  border-radius: 10px;
}

.dot-caption {
  width: 7px;
  height: 7px;
  background: var(--primary-color);
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.catcard-index {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-color);
  width: fit-content;
  transition: var(--transition);
}

.catcard-index i {
  color: var(--primary-color);
  flex-shrink: 0;
}

.catcard-info-panel {
  position: sticky;
  top: 6rem;
  height: fit-content;
  background: var(--surface-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  animation: slideIn 0.5s ease-out;
  transition: var(--transition), opacity 0.4s ease, top 0.3s ease, transform 0.4s ease !important;
  will-change: opacity, transform;
}

.catcard-info-panel.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.catcard-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.catcard-info-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(var(--primary-color-rgb), 0.12);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

.catcard-info-title-wrapper {
  display: flex;
  flex-direction: column;
}

.catcard-info-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color);
}

.catcard-info-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

.catcard-info-content {
  padding: 0;
}

.catcard-info-description {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 13px;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  position: relative;
  border: 1px solid var(--border-color);
}

.catcard-info-description::before {
  content: 'Описание';
  position: absolute;
  top: -9px;
  left: 14px;
  background: var(--surface-color);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 4px;
}

.catcard-info-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.stat-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-color-rgb), 0.12);
  border-radius: 6px;
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 11px;
  color: var(--primary-color);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.dropdown-icon {
  width: 23px;
  height: 23px;
  object-fit: contain;
  transition: all 0.2s ease;
}

@media (max-width: 790px) {
  .catcard-section {
    padding: 1.5rem 1rem;
  }

  .catcard-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .catcard-info-panel {
    position: static;
    order: -1;
  }

  .catcard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .catcard {
    min-height: 280px;
  }

  .catcard-image-container {
    height: 180px;
  }

  .catcard-nav {
    padding: 12px;
    margin-bottom: 1rem;
  }

  .catcard-back-btn,
  .dropbtn {
    padding: 0.6rem 1rem;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .catcard-section {
    padding: 1rem 0.75rem;
  }

  .catcard-grid {
    grid-template-columns: 1fr;
  }

  .catcard {
    min-height: 280px;
  }

  .catcard-image-container {
    height: 190px;
  }

  .catcard-caption {
    font-size: 12px;
  }

  .catcard-info-title {
    font-size: 0.9rem;
  }

  .catcard-info-description {
    font-size: 12px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .dropdown-content {
    right: 0;
    min-width: 260px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .catcard:hover {
    transform: none;
  }

  .catcard::before {
    display: none;
  }

  .catcard-back-btn:hover {
    transform: none;
    background: var(--surface-color);
  }
}