.page--nft {
  align-items: stretch;
}

.nft-body {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vh, 64px);
}

.nft-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.token-filter {
  background: rgba(255, 255, 255, 0.45);
  border: 3px solid rgba(47, 42, 30, 0.25);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-xs);
  padding: 12px 18px;
  border-radius: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

.token-filter:hover,
.token-filter:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-4px);
}

.token-filter--active {
  background: var(--color-accent);
  color: #fff7d6;
  border-color: rgba(47, 42, 30, 0.45);
}

.nft-grid {
  display: grid;
  width: 100%;
  margin: 0 auto;
  gap: clamp(28px, 5vw, 52px);
  padding: clamp(40px, 5vw, 80px) clamp(48px, 7vw, 112px);
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  justify-items: center;
}

@media (max-width: 1280px) {
  .nft-grid {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}

@media (max-width: 960px) {
  .nft-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    padding: clamp(32px, 6vw, 56px);
  }
}

@media (max-width: 620px) {
  .nft-grid {
    grid-template-columns: repeat(1, minmax(240px, 1fr));
    padding: clamp(28px, 8vw, 48px);
    gap: clamp(24px, 9vw, 32px);
  }
}

.nft-card {
  width: min(320px, 100%);
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  border: 4px solid rgba(47, 42, 30, 0.25);
  min-height: 320px;
}

.nft-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nft-card__tier {
  font-size: var(--font-size-xs);
  color: var(--color-muted);
}

.nft-card--fallback-hover:hover,
.nft-card--fallback-hover:focus-visible {
  transform: translateY(-6px) scale(1.04);
  transition: transform 0.2s ease;
}

.nft-card__frame {
  width: clamp(220px, 70%, 260px);
  position: relative;
  margin: 0 auto;
  isolation: isolate;
}

.nft-card__frame::before {
  content: '';
  display: block;
  width: 100%;
  padding-top: 100%;
}

.nft-card__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: rgba(255, 215, 0, 0.3);
  box-shadow: 0 22px 38px rgba(47, 42, 30, 0.18);
  filter: drop-shadow(0 12px 18px rgba(255, 180, 0, 0.25));
  z-index: 0;
}

.nft-card__canvas {
  position: absolute;
  inset: 12%;
  border-radius: 26px;
  background: #fee680;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255, 238, 128, 0.4);
  z-index: 1;
}

.nft-card__canvas img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nft-card__name {
  font-size: var(--font-size-xs);
  color: var(--color-text);
  text-align: center;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .nft-toolbar {
    justify-content: flex-start;
  }
}
