.card-detail-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-share { z-index: 3; }
.card:has(.card-share.shared) { z-index: 8; overflow: visible; }
.card-footer .card-actions,
.card-footer .card-actions button { position: relative; z-index: 3; }
.card:has(.card-detail-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-detail-link:focus-visible { outline: 0; }
.card:focus-within { border-color: var(--border-strong); }
.card.r-legendary:focus-within { border-color: transparent; }

.card-bottom.card-footer {
  width: 100%;
  min-height: 86px;
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

.card-price-row { min-height: 30px; display: flex; align-items: baseline; }
.card-footer .card-price { font-size: 20px; line-height: 1.2; }
.card-footer .card-original { margin-right: 7px; color: var(--faint); font-size: 12px; font-weight: 500; text-decoration: line-through; }
.card-footer .card-price small { margin-left: 3px; font-size: 10px; }
.card .card-footer .card-actions { width: 100%; min-height: 44px; margin-left: 0; display: flex; justify-content: stretch; gap: 8px; }
.card-footer .favorite-btn,
.card-footer .btn-cart { flex: 1 1 0; width: auto; min-width: 0; height: 44px; padding: 0 10px; gap: 7px; overflow: hidden; white-space: nowrap; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.card-footer .favorite-btn { gap: 7px; }
.card-action-label { max-width: none; overflow: visible; opacity: 1; font-size: 11px; font-weight: 700; }

.card.sold:hover { transform: none; box-shadow: none; }
.card.sold .card-name.rarity-name { color: var(--muted); -webkit-text-fill-color: var(--muted); }
.card.sold .card-meta,
.card.sold .card-price { color: var(--muted); }
.card.sold .card-footer .card-actions { justify-content: stretch; }
.card.sold .btn-sold { width: 100%; min-height: 44px; color: var(--muted); background: var(--surface-2); }

@media (max-width: 640px) {
  .card-bottom.card-footer { min-height: 84px; }
  .card .card-footer .card-actions { width: 100%; }
  .card-footer .favorite-btn,
  .card-footer .btn-cart { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-footer .favorite-btn,
  .card-footer .btn-cart { transition: none; }
}
