:root {
  --bg: #1b1e22;
  --panel: #2a2f36;
  --slot: #343a43;
  --radius: 20px;
}

.category {
  max-width: 80%;
  margin: auto;
  padding: 0 24px;
}

.category-title {
  background: var(--panel);
  border-radius: var(--radius);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding: 16px;
}

@media (max-width: 1400px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 18px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 220px;
}

.hero {
  border-radius: 22px;
  background: var(--slot);
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-content: center;
}

.pets img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;

  border-radius: 18px;
  background: var(--slot);
}

.pets img {
  grid-column: span 3;
}
.pets:not(:has(img:nth-child(2))) img {
  grid-column: 2 / span 4;
}
.pets:has(img:nth-child(3)):not(:has(img:nth-child(4))) img:nth-child(3) {
  grid-column: 2 / span 3;
}
.pets:has(img:nth-child(4)):not(:has(img:nth-child(5))) img:nth-child(n + 3) {
  grid-column: span 3;
}
.pets:has(img:nth-child(5)) img:nth-child(n + 3) {
  grid-column: span 2;
}
.pets:has(img:nth-child(6)) img {
  grid-column: span 2;
}

.equipment {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.equipment-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 18px;
  background: var(--slot);
  min-height: 76px;
}

.equipment-row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
}

.equipment-row img:first-child {
  margin-right: auto;
  z-index: 3;
}

.equipment-row img:last-child {
  margin-left: auto;
  z-index: 3;
}

.equipment-row img:not(:first-child):not(:last-child) {
  position: absolute;
  left: 60px;
  z-index: 4;
}

.equipment-row img:nth-child(2) {
  transform: translateX(-10px);
}
.equipment-row img:nth-child(3) {
  transform: translateX(-22px);
}
.equipment-row img:nth-child(4) {
  transform: translateX(-34px);
}

.combo-troops {
  display: grid;
  grid-template-rows: 1fr 1fr; /* герой сверху, пет снизу */
  gap: 12px;

  background: var(--slot);
  border-radius: 22px;
  padding: 12px;
}
.combo-troops img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}
.combo-info {
  background: var(--slot);
  border-radius: 22px;
  display: flex;
  align-items: center;
  padding: 20px 22px;
}
.combo-info p {
  margin: 0;
  line-height: 1.55;
  font-size: 12px;
  color: #cfd3d8;
}
