#upgrades-section {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

#upgrades-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Card ---- */
.upgrade-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
  flex: 1;
  min-width: 190px;
  max-width: 320px;
}

.upgrade-card.can-afford {
  border-color: #fbbf24;
  background: #fffbeb;
}

/* ---- Icon ---- */
.upg-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

/* ---- Info ---- */
.upg-info {
  flex: 1;
  min-width: 0;
}

.upg-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.upg-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ---- Buy button ---- */
.btn-buy-upg {
  background: var(--yellow);
  color: #fff;
  border: none;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.btn-buy-upg:hover:not(:disabled) {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-buy-upg:active:not(:disabled) {
  transform: translateY(0);
}

.btn-buy-upg:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
  #upgrades-section { padding: 12px; }

  /* En móvil, las mejoras ocupan ancho completo */
  .upgrade-card {
    min-width: unset;
    max-width: unset;
    flex: 1 1 100%;
  }

  .upg-icon  { font-size: 20px; }
  .upg-name  { font-size: 12px; }

  .btn-buy-upg {
    font-size: 11px;
    padding: 6px 8px;
    min-height: 36px;
  }
}
